package com.zd.springcloud.consumer.controller;

import com.zd.springcloud.consumer.service.BusinessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController

public class BussinessController {


    @Autowired
    BusinessService businessService;

    //下订单

    /**
     *
     * 1、谁再买
     * 2、买的商品
     * 3、买的商品数量
     *
     *
     * @return
     */
    @RequestMapping("/placeOrder")
    public String placeOrder(long accountId,Long goodId,int num){
        businessService.placeOrder(accountId,goodId,num);
        return "success";
    }
}
